import React, { ReactElement } from 'react';
import { View } from 'react-native';
import CustomText from '../../../../components/Text';

import styles from './style';

interface ItemProps {
  children?: any;
  title: string;
}

export default ({ children, title }: ItemProps): ReactElement => {
  return (
    <View style={styles.item}>
      <View style={styles.titleContent}>
        <CustomText style={styles.title}>{title}</CustomText>
      </View>
      {children}
    </View>
  );
};
